#pragma once

extern const UINT WMR_UPDATE_LID;
extern const UINT WMR_UPDATE_BUTTON;

class CTestClientDlg: public CDialogEx {
public:

	CTestClientDlg( CComPtr<IPanicButton>& pPanicButton, CComPtr<IPanicButtonEventSink> pPanicButtonEventSink, CWnd* pParent = nullptr );

	enum { IDD = IDD_TESTCLIENT_DIALOG };

protected:

	virtual void DoDataExchange( CDataExchange* pDX );

protected:

	virtual BOOL OnInitDialog( void );
	afx_msg void OnSysCommand( UINT nID, LPARAM lParam );
	afx_msg void OnPaint( void );
	afx_msg HCURSOR OnQueryDragIcon( void );
	afx_msg void OnClose( );
	afx_msg void OnOk( );
	afx_msg void OnCancel( );

	afx_msg LRESULT OnUpdateLid( WPARAM wParam, LPARAM lParam );
	afx_msg LRESULT OnUpdateButton( WPARAM wParam, LPARAM lParam );

private:

	HICON m_hIcon;

	CComPtr<IPanicButton> m_pPanicButton;
	CComPtr<IPanicButtonEventSink> m_pPanicButtonEventSink;

	CString m_strButtonStatus;
	CString m_strLidStatus;

	bool _SetUpPanicButton( void );
	void _TearDownPanicButton( void );

	DECLARE_MESSAGE_MAP( )

};
